/*
 * protocol.h
 *
 *  Created on: 29 Apr 2015
 *      Author: yiqi.pan
 */

#ifndef SRC_PROTOCOL_H_
#define SRC_PROTOCOL_H_

#define PACKET_HEADER_LEN 2
#define PACKET_CHECKSUM_LEN 2
#define PACKET_FRAME_LEN (PACKET_HEADER_LEN + PACKET_CHECKSUM_LEN)

uint8_t receive_packet(uint8_t* packet, uint8_t packetlen);

uint8_t parse_packet(uint8_t* data, uint8_t datalen);

#endif /* SRC_PROTOCOL_H_ */
